package com.boot.mapper;

import com.boot.entity.Menu;
import com.boot.entity.User;
import com.boot.vo.AuthVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {

    List<User> list(
            @Param("start") Integer start,
            @Param("pageSize")Integer pageSize,String userName);

    int count(String userName);

    void del(@Param("id")Long id);

    User getById(@Param("id")Long id);

    void updateById(User user);

    void save(User user);

    void delByIds(List<Long> ids);

    User selectByUserNameAndPassword(@Param("userName")String userName, @Param("password")String password);

    void auth(AuthVo authVo);

    void delAuth(@Param("userId") Long userId);

    List<Menu> getMenusByUserId(@Param("id") Long id);

}
